<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <!-- 08非表单元素的属性（href title id src等） -->
  <!-- 调用bij.href -->
  <a href="http://" target="_blank" rel="noopener noreferrer" id="qn1" title="asd" class="111111"></a>
  <img src="./img/QQ图片20221222111355.jpg" alt="123" id="im1">
  <script>
  // 获取元素
  var an = document.getElementById("qn1");
  var img1 = document.getElementById("im1");
  // 获取属性
  console.log(an.target);
  console.log(an.rel);
  console.log(an.title);
  console.log(an.className);
  console.log(img1.alt);
  console.log(img1.src);
  // 右侧赋值都是字符串格式
  img1.src ="./img/QQ图片20230124180315.jpg"
  </script>
</body>
</html> 